package com.aynu.webshop.web.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.aynu.webshop.core.generic.GenericDao;
import com.aynu.webshop.core.generic.GenericServiceImpl;
import com.aynu.webshop.web.dao.OrderformMapper;
import com.aynu.webshop.web.model.Orderform;
import com.aynu.webshop.web.service.OrderformService;
@Service
public class OrderformServiceImpl extends GenericServiceImpl<Orderform, Integer> implements OrderformService {

	@Resource
	private OrderformMapper orderformMapper;
	
	@Override
	public int insert(Orderform model) {
		// TODO Auto-generated method stub
		return orderformMapper.insertSelective(model);
	}

	@Override
	public int update(Orderform model) {
		// TODO Auto-generated method stub
		return orderformMapper.updateByPrimaryKeySelective(model);
	}

	@Override
	public int delete(Integer id) {
		// TODO Auto-generated method stub
		return orderformMapper.deleteByPrimaryKey(id);
	}

	@Override
	public Orderform selectById(Integer id) {
		// TODO Auto-generated method stub
		return orderformMapper.selectByPrimaryKey(id);
	}

	@Override
	public Orderform selectOne() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Orderform> selectList() {
		// TODO Auto-generated method stub
		return orderformMapper.findAll();
	}

	@Override
	public GenericDao<Orderform, Integer> getDao() {
		// TODO Auto-generated method stub
		return orderformMapper;
	}

	@Override
	public List<Orderform> selectByuIdstatus(Integer uid, Integer status) {
		// TODO Auto-generated method stub
		return orderformMapper.selectByuIdstatus(uid,status);
	}

	@Override
	public List<Orderform> selectByuId(Integer uid) {
		// TODO Auto-generated method stub
		return orderformMapper.selectByuId(uid);
	}

	@Override
	public int findMaxOrderform() {
		// TODO Auto-generated method stub
		return orderformMapper.findMax();
	}

}
